/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2025 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "math.h"
#include "stdlib.h"

#include "PID.h"
#include "M3508.h"
#include "can.h"
#include "GO-M8010-6.h"
#include "SBUS.h"
#include "USART.h"
#include "GM6020.h"
#include "RobotControl.h"
#include "AK7010.h"
/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define leg_Pin GPIO_PIN_8
#define leg_GPIO_Port GPIOF
#define arm_Pin GPIO_PIN_4
#define arm_GPIO_Port GPIOC
#define hand_Pin GPIO_PIN_0
#define hand_GPIO_Port GPIOB
#define photogate_Pin GPIO_PIN_8
#define photogate_GPIO_Port GPIOC
#define photogate_EXTI_IRQn EXTI9_5_IRQn

/* USER CODE BEGIN Private defines */

#define BUFFERSIZE 255	//�ɽ��յ����������
extern uint8_t Rx_len;
extern uint8_t ReceiveBuff[BUFFERSIZE]; //���ջ�����
extern uint8_t claw_flag;
typedef union{
  float f[64];
  uint8_t c[256];
}facdata;//�������չ�����
extern facdata dataBuff;//dataBuff.f[i]��ʾ��i��������
/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
